/*
 * @Descripttion: 
 * @version: 
 * @Author: hzx
 * @Date: 2021-02-25 17:35:50
 * @LastEditors: hzx
<<<<<<< HEAD
 * @LastEditTime: 2021-03-28 01:07:30
=======
 * @LastEditTime: 2021-03-28 00:37:04
<<<<<<< HEAD
=======
 * @LastEditTime: 2021-03-28 00:51:48
>>>>>>> develop
>>>>>>> e5a48406fd8e4a16e53f6aa0673edca1dfeea8f0
 */
/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */

module.exports = appInfo => {
    /**
     * built-in config
     * @type {Egg.EggAppConfig}
     **/
    const config = exports = {};

    // use for cookie sign key, should change to your own and keep security
    config.keys = appInfo.name + '_1614245692716_4163';

    // add your middleware config here
    config.middleware = [];

    // add your user config here
    const userConfig = {
        // myAppName: 'egg',
    };

    config.mysql = {
        //database setting
        client: {
			//需要数据库自己找我
            // host
            host: 'localhost',
            // 端口号
            port: '3306',
            // 用户名
            user: 'root',
            // 密码
            password: 'root',
            // 数据库名
            database: 'student',
        },
        // load into app, default is open
        app: true,
        // load into agent, default is close
        agent: false
    }
    config.security = {
        csrf: {
            enable: false
        },
        domainWhiteList: ['*']
    };
    return {
        ...config,
        ...userConfig,
    };
};
